home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / TrickyClickyBall.swf / scripts / frame_3 / PlaceObject2_74_39 / CLIPACTIONRECORD onClipEvent(enterFrame).as < prev    next >
Encoding:
Text File  |  2005-09-27  |  1.7 KB  |  71 lines

  1. onClipEvent(enterFrame){
  2.    if(_root.pauseIt <= 0)
  3.    {
  4.       if(_root.trickster != 1)
  5.       {
  6.          this._y += _root.gravitySetting - _root.slower;
  7.       }
  8.       else
  9.       {
  10.          millo = random(7) + 1;
  11.          switch(millo)
  12.          {
  13.             case 1:
  14.                upper = 1;
  15.                this._y -= _root.gravitySetting - _root.slower;
  16.                break;
  17.             case 2:
  18.                this._y += _root.gravitySetting - _root.slower;
  19.                upper = 0;
  20.                break;
  21.             default:
  22.                if(upper == 1)
  23.                {
  24.                   this._y -= _root.gravitySetting - _root.slower;
  25.                }
  26.                else
  27.                {
  28.                   this._y += _root.gravitySetting - _root.slower;
  29.                }
  30.          }
  31.       }
  32.       xPos = random(2) + 1;
  33.       switch(xPos)
  34.       {
  35.          case 1:
  36.             this._x += random(_root.ballRandom) + 5;
  37.             if(this.hitTest(_root.wall2))
  38.             {
  39.                this._x -= 14;
  40.             }
  41.             break;
  42.          case 2:
  43.             this._x -= random(_root.ballRandom) + 5;
  44.             if(this.hitTest(_root.wall1))
  45.             {
  46.                this._x += 14;
  47.             }
  48.       }
  49.    }
  50.    else
  51.    {
  52.       _root.pauseIt -= 1;
  53.    }
  54.    if(_root.slower > 0)
  55.    {
  56.       _root.slower -= 0.1;
  57.    }
  58.    if(_root.slower < 0)
  59.    {
  60.       _root.slower = 0;
  61.    }
  62.    if(this.hitTest(_root.extriYo2) || this.hitTest(_root.extriYo1))
  63.    {
  64.       this._y -= random(10) + 7;
  65.    }
  66.    if((this.hitTest(_root.ground) || this.hitTest(_root.ground2)) && _root.doubleBall == 1)
  67.    {
  68.       _root.gotoAndStop(4);
  69.    }
  70. }
  71.